package flc.ast.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;

import flc.ast.BaseAc;
import flc.ast.R;
import flc.ast.databinding.ActivityWeatherWidgetBinding;
import stark.common.basic.event.EventStatProxy;

public class WeatherWidgetActivity extends BaseAc<ActivityWeatherWidgetBinding> {


    @Override
    protected int onCreate() {
        return R.layout.activity_weather_widget;
    }

    @Override
    protected void initView() {
        EventStatProxy.getInstance().statEvent1(this, mDataBinding.event1Container);

        mDataBinding.ivWeatherWidgetBack.setOnClickListener(v -> onBackPressed());

        //天气组件
        mDataBinding.llIncludeWeather1.setOnClickListener(this);
        mDataBinding.llIncludeWeather2.setOnClickListener(this);
        mDataBinding.llIncludeWeather3.setOnClickListener(this);
        mDataBinding.llIncludeWeather4.setOnClickListener(this);
        mDataBinding.llIncludeWeather5.setOnClickListener(this);
    }

    @Override
    protected void onClickCallback(View v) {
        switch (v.getId()) {
            case R.id.llIncludeWeather1:
                EditWeatherActivity.start(mContext, 1);
                break;
            case R.id.llIncludeWeather2:
                EditWeatherActivity.start(mContext, 2);
                break;
            case R.id.llIncludeWeather3:
                EditWeatherActivity.start(mContext, 3);
                break;
            case R.id.llIncludeWeather4:
                EditWeatherActivity.start(mContext, 4);
                break;
            case R.id.llIncludeWeather5:
                EditWeatherActivity.start(mContext, 5);
                break;
            default:
                break;
        }
    }

    @Override
    protected void initData() {

    }
}